// utils/glob.js
export function registerComponents(app) {
    const components = import.meta.glob('../components/service/**/*.vue');

    for (const path in components) {
        const componentName = path
            .split('/')
            .pop()
            .replace(/\.\w+$/, '');

        const component = components[path].default;
        ;
        // 注册全局组件
        app.component(componentName, component);
    }
}